package com.weipai.education.controller;

import com.weipai.education.model.api.Response;
import com.weipai.education.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 曹朋飞
 * @Date: 2018/12/11 15:25
 *
 * 短信验证码接口
 */
@RestController
public class SmsController {

    @Autowired
    private SmsService smsService;

    /**
     * 发送验证码
     * @param phone
     * @return
     */
    @RequestMapping(value = "/sms/sendCode", method = RequestMethod.POST)
    public Response sendCode(String phone) {
        return smsService.sendCode(phone);
    }

    
}
